{% extends "admin/base_site.html" %}
{% load i18n adminmedia %}

{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}

{% block userlinks %}
<ul>
  {% url django-admindocs-docroot as docsroot %}
  {% if docsroot %}
    <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
  {% endif %}
  <li><a href="../password_change/">{% trans 'Change password' %}</a></li>
  <li class="last"><a href="../logout/">{% trans 'Log out' %}</a></li>
</ul>
{% endblock %}

{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}

{% block title %}{% trans 'Password change' %}{% endblock %}

{% block content %}

<h1>{% trans 'Password change' %}</h1>
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>

<div id="content-main">
<form action="" method="post">
<div>
{% if form.errors %}
    <p class="errornote">
    {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
{% endif %}

<fieldset class="module aligned">

<div class="form-row {% if form.old_password.errors %}errors{% endif %}">
  {{ form.old_password.errors }}
  <label for="id_old_password" class="required">{% trans 'Old password:' %}</label> {{ form.old_password }}
</div>

<div class="form-row {% if form.new_password1.errors %}errors{% endif %}">
  {{ form.new_password1.errors }}
  <label for="id_new_password1" class="required">{% trans 'New password:' %}</label> {{ form.new_password1 }}
</div>

<div class="form-row {% if form.new_password2.errors %}errors{% endif %}">
  {{ form.new_password2.errors }}
  <label for="id_new_password2" class="required">{% trans 'Confirm password:' %}</label> {{ form.new_password2 }}
  <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
</div>

</fieldset>

<div class="submit-row">
<input type="submit" value="{% trans 'Change password' %}" />
</div>

<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</div>
</form></div>
{% endblock %}
